// 测试 控制器模块

// first接口的控制器函数
let firstCol = (req, res) => {
  res.send({ code: 1, message: '请求/test/first成功' });
}
// second接口的控制器函数
let senCol = (req, res) => {
  res.send({ code: 1, message: '请求/test/second成功', info: req.query });
}

let thirdCol = (req, res) => {
  res.send({ code: 1, message: '请求/test/third成功', info: req.body });
}

let thourthCol = (req, res) => {
  // console.log( req.file )
  res.send({
    code: 1, message: '请求/test/fourth成功', info: {
      params: req.body,
      avator: req.file.filename
    }
  });
}
// 导出
module.exports = {
  firstCol, senCol, thirdCol, thourthCol
}